import axios from "axios";
import {genSignalObj} from "./signal-utils.js";

const service = axios.create({
    baseURL: "http://localhost:8080"
})

service.interceptors.request.use(config=>{
    // 生成指纹
    const {url, params, data} = config
    config.headers = {
        ...genSignalObj(url, params, data)
    }
    return config
})

export {
    service
}